Skip to content

Solution#1033

Open
VasylPylypchynets wants to merge 3 commits intomate-academy:mainfrom
VasylPylypchynets:develop
Open

Solution#1033
VasylPylypchynets wants to merge 3 commits intomate-academy:mainfrom
VasylPylypchynets:develop

Conversation

@VasylPylypchynets
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This is a good start, but changes are needed because some core requirements from the task description have not been met. Your test suite is missing several required example cases.

Please add tests for the following examples, which are explicitly mentioned in the task description:

  • splitInteger(8, 1)
  • splitInteger(6, 2)
  • splitInteger(17, 4)

Additionally, I noticed a duplicate test case for splitInteger(32, 6). It's best to remove the redundant test to keep the suite clean and ensure each test provides unique value. Once these required tests are added, your solution will be complete!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

test(`should return a part equals to a value
when splitting into 1 part`, () => {

expect(splitInteger(32, 1)).toEqual([32]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requirements specify several example cases to test, including splitInteger(8, 1), splitInteger(6, 2), and splitInteger(17, 4). Your current tests are missing these. Please add tests to cover all the required examples from the task description.


test('should sort parts ascending if they are not equal', () => {

expect(splitInteger(32, 6)).toEqual([5, 5, 5, 5, 6, 6]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case uses the same inputs and expected output as the test on line 7, making it a duplicate. It's best to have unique test cases. You could replace this with one of the missing required examples, like splitInteger(17, 4).

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great progress on this! Your test suite is much more robust. However, a couple of changes are needed to fully meet the task requirements. The test suite is missing the required test case for splitInteger(32, 6). Additionally, one of the tests uses splitInteger(10, 1) instead of the required splitInteger(8, 1). Please add the missing test and update the other one to use the exact values specified in the task description. Once those two examples are covered, this will be perfect!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

test(`should return a part equals to a value
when splitting into 1 part`, () => {

expect(splitInteger(10, 1)).toEqual([10]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this test is valid, the task description specifically requires a test for splitInteger(8, 1). Please update this test to use the example provided in the requirements.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Great job on fixing the test case for splitInteger(8, 1)! Your test suite is looking very solid.

The only thing missing is the required test case for splitInteger(32, 6). To fully meet the task requirements, please add a test to verify that this function call correctly returns [5, 5, 5, 5, 6, 6].

I am approving your submission as an educational override to help you progress. Keep up the excellent work, you're very close to a perfect solution!


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment on lines 19 to 21
test('should add zeros if value < numberOfParts', () => {

expect(splitInteger(4, 7)).toEqual([0, 0, 0, 1, 1, 1, 1]);
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good test for an edge case! However, the task description requires a specific test case for splitInteger(32, 6) which is currently missing. Please make sure to add a test for that example to meet all the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants